using System;
using System.Collections;
using Infragistics.UltraChart.Resources;

namespace CustomChart
{
	public class TimeAxisRender : IRenderLabel
	{
		protected DateTime mStartTime;

		public DateTime StartTime
		{
			get
			{
				return mStartTime;
			}
		}

		public TimeAxisRender()
		{
			mStartTime = new DateTime(1, 1, 1, 0, 0, 0);
		}

		public string ToString(Hashtable context)
		{
			if (context["LABEL_RENDER_LOCATION"].ToString().CompareTo("Axis") == 0)
			{
				double num = (double)context["DATA_VALUE"];
				if (num < 0.0)
				{
					num = 0.0;
				}
				return mStartTime.AddSeconds(num).ToLongTimeString();
			}
			double num2 = (double)context["DATA_VALUE_X"];
			if (num2 < 0.0)
			{
				num2 = 0.0;
			}
			return "(" + mStartTime.AddSeconds(num2).ToLongTimeString() + "," + Convert.ToDouble(context["DATA_VALUE_Y"]).ToString("0.0") + ")";
		}
	}
}
